package com.sense.kukoo.biz_explore.model

import com.sense.kukoo.common.mvvm.model.BaseMvvmModel
import com.sense.kukoo.common.repo.bean.ResultBean
import com.sense.kukoo.common.repo.http.KukooHttpApi
import com.sense.kukoo.common.repo.http.KukooHttpManager
import com.sense.kukoo.common.repo.http.bean.ModuleBean
import com.sense.kukoo.common.repo.http.bean.UserMessagesBean

class Explore2Model: BaseMvvmModel() {

    private val TAG: String = javaClass.simpleName

    override fun onModelCleared() {}

    suspend fun indexModule(): ResultBean<List<ModuleBean>> {
        return KukooHttpManager.instance
            .createHttpClient(KukooHttpApi::class.java)
            .indexModule()
    }

    suspend fun messageCount(): ResultBean<UserMessagesBean> {
        return KukooHttpManager.instance
            .createHttpClient(KukooHttpApi::class.java)
            .messageCount()
    }
}